/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    FangYongliang
 * 创建时间:    2023-12-15
 */
package org.jeecg.modules.dock.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * //TODO 【请填写类描述】
 *
 * @author FangYongliang
 * @version 1.0.0
 * @since 2023-12-15
 */
@Component
@ConfigurationProperties(prefix = "wms.config.personnel")
@Getter
@Setter
public class WmsConfigPersonnel {

    private String sap;
    private String mes;
    private String mds;
    private String ems;
    private String nest;

    public String getByKey(String source){
        source = source.toUpperCase();
        String result = null;
        switch (source){
            case "SAP": result = sap==null?"sap人员":sap;break;
            case "MES": result = mes==null?"mes人员":mes;break;
            case "MDS": result = mds==null?"mds人员":mds;break;
            case "EMS": result = ems==null?"ems人员":ems;break;
            case "NEST": result = nest==null?"nest人员":nest;break;
            case "QMS": result = "qms人员";break;
            default: result = "未知人员";
        }
        return result;
    }
}
